<template>
  <div id="app">
    <one :message="parsentMsg"></one>
    <two @parsent="getMsg"></two>
  </div>
</template>

<script>
import one from './components/one.vue'
import two from './components/two.vue'
export default {
   components:{
    one,
    two
  },
  data(){
    return{
       parsentMsg: '子组件向父组件传值',
       getchildMsg: '我是父组件的msg'
    }
  },
  methods:{
    getMsg(data){
      this.getchildMsg = data;
      console.log(this.getchildMsg)
    }
  }
}
</script>

<style lang="scss">

</style>
